//Francisco "Kiko" Olvera
//are one of three types: STRAIGHT, ELBOW, THREEWAY
//may or may not have powerup or artifact; cannot have both
//track own position on board
//face one of four directions: NORTH, SOUTH, EAST, WEST
//Tile.h

#pragma once
#include "Structures.h"
#include "Material.h"

class Artifact;
class PowerUp;

class Tile
{
private:
	int m_type;
	Artifact* m_artifact;
	PowerUp* m_power;
	XY m_boardPos;
	int m_orientation;
	bool m_movable;
	Material* material;
public:
	Tile();
public:
	//Sets

	//for "glued" pieces
	void setSpawn(int a_type, XY a_boardPos, int direction);
	//for individual vars
	inline void setType(int a_type)					{m_type = a_type;}
	inline void setPower(PowerUp* a_powerup)		{m_power = a_powerup;}
	inline void setArtifact(Artifact* a_artifact)	{m_artifact = a_artifact;}
	inline void setBoardPos(XY a_boardPos)			{m_boardPos = a_boardPos;}
	inline void setOrientation(int a_dir)			{m_orientation = a_dir;}
	inline void setMovable(bool aBool)				{ m_movable = aBool; }
public:
	//Gets
	inline int getType()			{return m_type;}
	inline PowerUp* getPower()		{return m_power;}
	inline Artifact* getArtifact()	{return m_artifact;}
	inline XY getBoardPos()			{return m_boardPos;}
	inline int getOrientation()		{return m_orientation;}
	inline bool isMovable()			{return m_movable;}

	/**
	* Will's material stuff for lighting UI
	***************************************/
	void		 setMatToRed();
	void		 setMatToGreen();
	void		 setMatToYellow();
	void		 setMatToWhite();
	D3DMATERIAL9 getMaterial();
};